﻿//JumbotCms_4.1 Final
using System;
using System.Web;
using System.Data;
using Jumbot.Common;
using JumbotCms.Common;
namespace JumbotCms.WebFile.Customer
{
    public partial class _vipapply_ajax : JumbotCms.API.UserCenter
    {
        private string _operType = string.Empty;
        private string _response = string.Empty;

        protected void Page_Load(object sender, EventArgs e)

        {
            if (!CheckFormUrl())
            {
                Response.Write("提交有误");
                Response.End();
            }

            this._operType = q("oper");
            switch (this._operType)
            {
                case "checkvipapply":
                    ajaxCheckPayGet();
                    break;
                default:
                    DefaultResponse();
                    break;
            }
            Response.Write(this._response);
        }
        private void DefaultResponse()
        {
            User_Load("", "json");
        }
        private void ajaxCheckPayGet()
        {
            User_Load("", "json");
            string _Result = "0";
            doh.Reset();
            doh.ConditionExpress = "UserId=@userid and applytype=3 and checked=0";
            doh.AddConditionParameter("@userid", UserId);
            if (doh.Count("jcms_normal_user_apply") > 0)
                _Result = "0";
            else
                _Result = "1";
            this._response = "{result :\"" + _Result + "\",returnval :\"\"}";
        }
    }
}
